package homework.day10;

import java.util.*;

/**
 * 生成10个0-100之间的不重复的随机数,并输出
 * @author Xiloer
 *
 */
public class Test03 {
	public static void main(String[] args) {
		List<Integer> list = new LinkedList<>();
		Random rand = new Random();
		for(int i=0;i<10;i++){
			list.add(rand.nextInt(100));
		}
		System.out.println(list);
//		for(Integer in : list){
//			System.out.println(in);
//		}
		Iterator<Integer> it = list.iterator();
		while (it.hasNext()){
			Integer tr = it.next();
			System.out.println(tr);
		}
//		Collections.sort(list);
//		System.out.println(list);
//		System.out.println(list.size());
	}
}
